package com.hyt.it.ogt.ks.es;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * 考生行为轨迹
 * @author 朱振宇
 * @since 2023-03-13
 */
@ApiModel(value = "考生行为轨迹", description = "考生行为轨迹")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Data
public class CandidateOperationTrackLogDTO {

    @NotBlank(message = "id不能为空")
    @ApiModelProperty(value = "轨迹id")
    private String id;

    @NotBlank(message = "类型不能为空")
    @ApiModelProperty(value = "类型：1-答案 2-其它")
    private Integer type;

    @NotBlank(message = "考试id不能为空")
    @ApiModelProperty(value = "考试id")
    private String examId;

    @NotBlank(message = "考试考生id不能为空")
    @ApiModelProperty(value = "考试考生id")
    private String candidateId;

    @NotNull(message = "事件类型不能为空")
    @ApiModelProperty(value = "事件类型")
    private Integer eventType;

    @NotNull(message = "操作类型不能为空")
    @ApiModelProperty(value = "操作类型")
    private Integer operateType;

    @ApiModelProperty(value = "操作内容")
    private String operateContent;

    @ApiModelProperty(value = "操作人id")
    private String operateUser;

    @ApiModelProperty(value = "题号")
    private String itemSortName;

    @ApiModelProperty(value = "小题ID")
    private String itemId;

    @ApiModelProperty(value = "比如简答题、填空题")
    private String itemTypeName;

    @ApiModelProperty(value = "操作时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss.SSS", timezone = "GMT+8")
    private LocalDateTime beginTime;

    @ApiModelProperty(value = "用时")
    private Long takeTime;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createDate;

    @ApiModelProperty(value = "备注")
    private String remark;
}
